class User:
    """用户信息管理"""
    def __init__(self, first_name, last_name, login_attempts, **user_profiles):
        self.first_name = first_name
        self.last_name = last_name
        self.login_attempts = login_attempts
        self.user_profiles = user_profiles

    def describe_user(self):
        """打印用户信息"""
        print(f"User's name is {self.first_name.title()} {self.last_name.title()}.")
        print(self.user_profiles)
    
    def greet_user(self):
        """问候用户"""
        print(f"Hello! {self.first_name.title()} {self.last_name.title()}!")
    
    def increment_login_attempts(self):
        """将属性 login_attempts 增加 1"""
        self.login_attempts += 1

    def reset_login_attempts(self):
        """将属性 login_attempts 重置为 0"""
        self.login_attempts = 0


class Admin(User):
    """管理员权限"""
    def __init__(self, first_name, last_name, login_attempts, **user_profiles):
        super().__init__(first_name, last_name, login_attempts, **user_profiles)
        self.privileges = [
            "can add post",
            "can delete post",
            "can ban user"
        ]

    def show_privileges(self):
        """显示管理员的权限"""
        print(f"{self.first_name.title()} {self.last_name.title()} can")
        for privilege in self.privileges:
            print(f"- {privilege}")


john = User('John', 'Richard', 5,age=13, height='177cm')
john.describe_user()
john.greet_user()
john.increment_login_attempts()
print(john.login_attempts)
john.reset_login_attempts()
print(john.login_attempts)

admin = Admin('John', 'Richard', 5)
admin.show_privileges()